import { NgModule } from '@angular/core'

import { SharedModule } from '@shared'
import { UserRoutingModule } from './user-routing.module'
import { UserListComponent } from './list/list.component'
import { UserEditComponent } from './edit/edit.component'
import { UserService } from './user.service'
import { UserAlinterService } from './user-alinter.service'
import { UserNewComponent } from './new/new.component'
import { UserStoreService } from './user-store.service'
import { UserNewUserComponent } from './new/user/user.component'

const COMPONENTS = [
  UserListComponent,
]
const COMPONENTS_NOROUNT = [
  UserEditComponent,
  UserNewComponent,
  UserNewUserComponent,
]

@NgModule({
  imports: [
    SharedModule,
    UserRoutingModule
  ],
  declarations: [
    ...COMPONENTS,
    ...COMPONENTS_NOROUNT,
  ],
  entryComponents: COMPONENTS_NOROUNT,
  providers: [
    { provide: UserService, useClass: UserAlinterService},
    UserStoreService,
  ]
})
export class UserModule { }
